Skip to content

Skip IDEX L2A fits for saturated waveforms - #3589

Merged
lacoak21 merged 3 commits into
IMAP-Science-Operations-Center:devfrom
aldo9253:fit_saturation
Nov 10, 2026
Merged

lacoak21 merged 3 commits into
IMAP-Science-Operations-Center:devfrom
aldo9253:fit_saturation

Conversation

@aldo9253

@aldo9253 aldo9253 commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Change Summary

closes #3628

Overview

Skip fitting saturated TOF High, Target, and Ion Grid waveforms, preserving unsaturated channels within each event.

File changes

  • idex_l2a.py: apply saturation flags before fitting and return missing fit products for saturated waveforms.
  • test_idex_l2a.py: verify skipped fits and independent channel processing.

Testing

119 IDEX tests passed, Local CDF validation confirmed saturated fits were removed and retained fits were unchanged.

@aldo9253
aldo9253 marked this pull request as ready for review November 2, 2026 19:38
@tmplummer
tmplummer requested a review from lacoak21 November 2, 2026 20:06
@lacoak21
lacoak21 requested a balanced review from Copilot November 4, 2026 16:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the saturation-aware waveform fitting changes.

No open issues 🎉

What changed in this PR

This PR updates IDEX L2A processing to skip fits for saturated waveforms while preserving events and independently processing unsaturated channels.

Changes:

  • Bypass TOF High peak fitting and return NaN fit products for saturated Target and Ion Grid waveforms.
  • Add tests for mixed, fully saturated, and unsaturated inputs, including optimizer skipping, channel independence, and CDF output.
File Description
imap_processing/​tests/​idex/​test_idex_l2a.py Tests saturation-aware fitting, unchanged inputs, and missing saturated fit products.
imap_processing/​idex/​idex_l2a.py Applies per-channel saturation flags before fitting and documents skipped-fit behavior.

Review effort: Balanced

@lacoak21

lacoak21 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

can you write an issue and link it to this PR? Same with your other PRs. We use issues to track work during monthly meetings and its good to have visibility for these PRs there.

@lacoak21 lacoak21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread imap_processing/idex/idex_l2a.py Resolved
@lacoak21

lacoak21 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@aldo9253 issue is still not linked above.

Seems like there is also an unaddressed comment

@lacoak21

lacoak21 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Also can you resolve the merge conflicts?

@lacoak21

lacoak21 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@aldo9253 issue is still not linked above.

Seems like there is also an unaddressed comment

I just linked it myself with
"closes #3628

@aldo9253

Copy link
Copy Markdown
Collaborator Author

Okay, should be good now!

Let me know if I missed something.

@lacoak21
lacoak21 merged commit c9297ef into IMAP-Science-Operations-Center:dev Nov 10, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IDEX L2A fitting: Don't fit saturation waveforms

3 participants